﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=1">
    <meta name="format-detection" content="telephone=no">
    <meta charset="UTF-8">
    <title>3.8Vue中的列表渲染</title>
    <link rel="stylesheet" href="../css/bootstrap.css"/>
    <script src="../js/jquery-2.2.0.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
</head>
<body>
<h1>3.8Vue中的列表渲染</h1>

<div id="app">
    <ul>
        <li v-for="item of list" :key="item.id">{{item.text}}</li>
    </ul>
</div>
<script src="../js/vue-2.5.16.js"></script>
<script src="../node_modules/axios/dist/axios.js"></script>
<script src="../node_modules/lodash/lodash.js"></script>

<script>

    //页面可以通过{{}}的方式渲染
    var app = new Vue({
        el:'#app',
        data:{
            list:[
                {id:1,text:'hello'},
                {id:2,text:'kyo'},
                {id:3,text:'wen'}
            ]
        }
    });

</script>

</body>
</html>
